package weibo4j;

import weibo4j.org.json.JSONException;
import weibo4j.org.json.JSONObject;


public class UserRelationShipVo {
	
	private String id;
	
	private String screen_name;
	
	private String followed_by;
	
	private String following;
	
	private String notifications_enabled;
	
	public UserRelationShipVo(){
		
	}

	public UserRelationShipVo(JSONObject json) throws JSONException{
		init(json);
	}
	
	public void init(JSONObject json) throws JSONException{
		if(json != null){
			id = json.getString("id");
			screen_name = json.getString("screen_name");
			if(json.getBoolean("followed_by")){
				followed_by = "1";
			}else{
				followed_by = "0";
			}
			if(json.getBoolean("following")){
				following = "1";
			}else{
				following = "0";
			}
			if(json.getBoolean("notifications_enabled")){
				notifications_enabled = "1";
			}else{
				notifications_enabled = "0";
			}
		}
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getScreen_name() {
		return screen_name;
	}

	public void setScreen_name(String screen_name) {
		this.screen_name = screen_name;
	}

	public String getFollowed_by() {
		return followed_by;
	}

	public void setFollowed_by(String followed_by) {
		this.followed_by = followed_by;
	}

	public String getFollowing() {
		return following;
	}

	public void setFollowing(String following) {
		this.following = following;
	}

	public String getNotifications_enabled() {
		return notifications_enabled;
	}

	public void setNotifications_enabled(String notifications_enabled) {
		this.notifications_enabled = notifications_enabled;
	}
}
